<form name="$ctrl.form">
  Input: <input type="text" name="input" ng-model="$ctrl.name" ng-model-options="$ctrl.options" />
</form>
Model: <tt>{{$ctrl.name}}</tt>
<hr>
<button ng-click="$ctrl.form.input.$setViewValue('some value', 'custom')">Trigger setViewValue with 'some value' and 'custom' event</button>

<hr>
<form ng-submit="$ctrl.updateOptions()">
  <b>updateOn</b><br>
  <input type="text" ng-model="$ctrl.options.updateOn" ng-change="$ctrl.updateEvents()" ng-model-options="{debounce: 500}">

  <table>
    <tr>
      <th>Option</th>
      <th>Debounce value</th>
    </tr>
    <tr ng-repeat="(key, value) in $ctrl.events">
      <td>{{key}}</td>
      <td><input type="number" ng-model="$ctrl.events[key]" /></td>
    </tr>
  </table>

  <br>
  <input type="submit" value="Update options">
</form>